Tricks for finding the order of a permutation